package git.soulbgm.controller;

import git.soulbgm.common.websocket.WebSocketServer;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author SoulBGM
 * @version 1.0
 * @date 2019/11/22 9:45
 */
@RestController
public class WebSocketController {

    @GetMapping("socket")
    public String pushToWeb(String cid, String message) {
        WebSocketServer.sendInfo(message, cid);
        return cid;
    }

}
